import ctypes

filename = "../library_mac/build/Debug/three_trackballs.dylib"
tw = ctypes.cdll.LoadLibrary(filename)

tw.globalInit.argtypes = []
tw.globalInit.restype = None

tw.globalDone.argtypes = []
tw.globalDone.restype = None

tw.startListening.argtypes = []
tw.startListening.restype = None

tw.stopListening.argtypes = []
tw.stopListening.restype = None

tw.getTrackballCursorIndex.argtypes = []
tw.getTrackballCursorIndex.restype = ctypes.c_int

tw.getTrackballDx.argtypes = [ctypes.c_int]
tw.getTrackballDx.restype = ctypes.c_int

tw.getTrackballDy.argtypes = [ctypes.c_int]
tw.getTrackballDy.restype = ctypes.c_int